<template>
  <j-modal
    :title="'原材料入库单 - ' + title"
    :width="width"
    :visible="visible"
    :maskClosable="false"
    :keyboard="false"
    draggable
    switchFullscreen
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">

    <template slot="footer">
      <a-button @click="handleCancel" :type="action==='detail'?'primary':''">{{action==='detail'?'关闭':'取消'}}</a-button>
      <a-button v-if="!disableSubmit" key="submit" @click="handleSubmit" type="primary">提交</a-button>
    </template>
    <mat-in-bill-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
  </j-modal>
</template>

<script>

  import matInBillForm from './matInForm'
  import { OrderModalMixin } from '../../common/mixins/OrderModalMixin'

  export default {
    name: 'matInModal',
    mixins: [OrderModalMixin],
    components: {matInBillForm},

    data() {
      return {
        width:1300,
      }
    },
  }
</script>

<style scoped>
</style>
